package JavaDesign.report_2.t_1;

/**
 * @author zouran
 * createDate：2023/9/27  1:33
 */
public class YearWorker extends Employee {
    int year;
    double yearSalary;

    public YearWorker(int year, double yearSalary) {
        this.year = year;
        this.yearSalary = yearSalary;
    }

    @Override
    double earnings() {
        return year * yearSalary;
    }
}
